﻿<html>

	<head>
		<title>商品查询管理</title>
		<meta charset="utf-8">
		<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
		<meta name="format-detection" content="telephone=no,email=no,date=no,address=no">

		<link href="../../css/skin/default/style.css" rel="stylesheet" type="text/css" />
		<link rel="stylesheet" href="../../css/dialog.css">
		<link href="../../js/lib/ligerUI/skins/Aqua/css/ligerui-all.css" rel="stylesheet" type="text/css" />

		<script src="../../js/lib/jquery/jquery-1.10.2.min.js" type="text/javascript"></script>
		<script src="../../js/lib/ligerUI/js/ligerui.all.js" type="text/javascript"></script>

		<script src="../../js/lib/ligerUI/js/plugins/ligerPopupEdit.js"></script>
		<script src="../../js/lib/ligerUI/js/plugins/ligerLayout.js" type="text/javascript"></script>
		<script src="../../js/lib/ligerUI/js/plugins/ligerGrid.js" type="text/javascript"></script>
		<script src="../../js/lib/ligerUI/js/plugins/ligerForm.js" type="text/javascript"></script>
		<script src="../../js/lib/ligerUI/js/plugins/ligerCheckBox.js" type="text/javascript"></script>
		<script src="../../js/lib/ligerUI/js/plugins/ligerComboBox.js" type="text/javascript"></script>
		<script src="../../js/lib/ligerUI/js/plugins/ligerDateEditor.js" type="text/javascript"></script>
		<script src="../../js/lib/ligerUI/js/plugins/ligerRadio.js" type="text/javascript"></script>
		<script src="../../js/lib/ligerUI/js/plugins/ligerTextBox.js" type="text/javascript"></script>
		<script src="../../js/lib/ligerUI/js/plugins/ligerSpinner.js" type="text/javascript"></script>
		<script src="../../js/lib/ligerUI/js/plugins/ligerTree.js" type="text/javascript"></script>
		<script src="../../js/lib/ligerUI/js/plugins/ligerDialog.js" type="text/javascript"></script>
		<script src="../../js/lib/ligerUI/js/plugins/ligerDrag.js" type="text/javascript"></script>
		<script src="../../js/lib/ligerUI/js/plugins/ligerResizable.js" type="text/javascript"></script>
		<script src="../../js/lib/ligerUI/js/plugins/ligerTip.js" type="text/javascript"></script>
		<script src="../../js/lib/ligerUI/js/plugins/ligerMenu.js" type="text/javascript"></script>
		<script src="../../js/lib/ligerUI/js/plugins/ligerToolBar.js" type="text/javascript"></script>
		<script src="../../js/lib/jquery.form.js" type="text/javascript"></script>
		<script src="../../js/lib/json2.js" type="text/javascript"></script>
		<script src="../../js/dialog.js"></script>
		<script src="../../js/JS/layout.js"></script>
		<script src="../../js/constants.js" type="text/javascript"></script>
		<script src="../../js/api.js" type="text/javascript"></script>

		<script type="text/javascript">
			var manager;
			$(document).hover(parent.hindMenu);  

			var productUrl = BaseUrl + "ProductTypeProduct?token=" + $api.getStorage("token");

			$(function() {
				$("form").ligerForm();
 
				var url = productUrl+"&key=";  
				manager = $("#maingrid4").ligerGrid({
						columns: [{
							display: '标题',
							name: 'title',
							align: 'left',
							wwidth: 320,
							render: function(rowdata, rowindex, value) {

								var ret = "<img src=" + rowdata.Fhimg + " class='listimgs' style='float:left;top:5px' />";
								ret += "<div style='margin-left:5px'><span  >" + "【" + rowdata.Fbrand + "】" + rowdata.Fsummary + "</span>";

								ret += "<div>"
								return ret;

							}
						},
						{
							display: '货号',
							name: 'Fpcode',
							align: 'left',
							width: 180,
							isSort: true
						},
						{
							display: '条码',
							name: 'Fbarcode',
							align: 'left',
							width: 180
						},
						{
							display: '原价',
							name: 'Foprice',
							isSort: true,
							width: 120,
							align: 'right'
						},
						{
							display: '售价',
							name: 'Fsaleprice',
							isSort: true,
							width: 120,
							align: 'left'
						},
						{
							display: '箱装数',
							name: 'Ft1',
							isSort: true,
							width: 120
						},
						{
							display: '大包装数',
							name: 'Ft2',
							isSort: true,
							width: 120
						}

					],
					dataAction: 'server',
					url: url,
					method: 'get',
					width: '99.5%',
					height: '95%',
					rowHeight: 100,
					checkbox: true,
					pageSize: 20,
					usePager: true 
				});
			}); 
			 

			function f_save() { 
					var rows = manager.getSelectedRows();
					if(rows) {
						return rows;
					}
					return null; 
			}
 
			 

			function doSearch() {
				var key = $("#txtKeywords").val(); 
				  
				var url = productUrl + "&key="+key; 
				manager.GetDataByURL(url);
			}
		</script>

	</head>

	<body class="mainbody2">
		<form id="form1" onsubmit="return false">
			<div class="toolbar-wrap">
				<div  class="toolbar">

					<div class="r-list">
						<input type="text" ID="txtKeywords" placeholder='品名/货号/条码' class="keyword" />
						<a class='btn-search' onclick='doSearch();' style="margin-right:10px;">搜索</a>
						 
					</div>
				</div>
			</div>
			<div id="hsearch" class="search-content" style="display:none; background:#fff;margin-bottom:10px;width:99.5%">
				<dl>
					<dt>商品类别</dt>
					<dd>
						<input type="text" id="PType" name="PType" placeholder='商品类别' ligerui="{width:180}" />
					</dd>
				</dl>
				<dl>
					<dt>商品品牌</dt>
					<dd>
						<input   id="PBarnd" name="PBarnd"  ligerui="{width:180}" />
					</dd>
				</dl>
				<dl>
					<dt>关键词</dt>
					<dd>
						<input type="text" placeholder='品名/货号/条码' ID="key" name="key" ltype="text" ligerui="{width:180,initSelect:true;nullText:'品名/货号/条码'}" />
					</dd>
				</dl>

				<div style="margin-top:20px;margin-left:140px">
					<input style="display:inline" type="button" value="搜索" class="btn" onclick="doSearch(true);" />
					<input style="margin-left:10px;display:inline" type="button" value="清空搜索" class="btn yellow" onclick="clear();" />
				</div>

			</div>
			<div id="maingrid4" style="margin: 0px;background:#fff;"></div>

		</form>

	</body>

</html>